<navigation:Page xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"  x:Class="SSOF.Client.Silverlight.Home" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
    xmlns:uc="clr-namespace:SSOF.Client.Silverlight.UserControls"
    d:DesignWidth="640" d:DesignHeight="300" mc:Ignorable="d"
    Style="{StaticResource PageStyle}">
    
    <Grid x:Name="LayoutRoot">
        <ScrollViewer x:Name="PageScrollViewer" Style="{StaticResource PageScrollViewerStyle}">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                
                <sdk:DataGrid x:Name="dgQuestionList" 
                              Grid.Column="0" 
                              Grid.ColumnSpan="2"
                              AutoGenerateColumns="False"
                              HeadersVisibility="Column" 
                              GridLinesVisibility="Horizontal"
                              RowHeight="70" 
                              Margin="10"
                              RowDetailsVisibilityMode="VisibleWhenSelected"
                              RowDetailsTemplate="{StaticResource mainRowDetailStyle}"
                              SelectionChanged="dgQuestionList_SelectionChanged" >
                    <sdk:DataGrid.Columns>
                        <sdk:DataGridTemplateColumn Header="Votes" CellTemplate="{StaticResource votesCellStyle}" SortMemberPath="NumberOfVotes" />
                        <sdk:DataGridTemplateColumn Header="Answers" CellTemplate="{StaticResource answersCellStyle}" SortMemberPath="NumberOfAnswers" />
                        <sdk:DataGridTemplateColumn Header="Views" CellTemplate="{StaticResource viewsCellStyle}" SortMemberPath="NumberOfViews" />
                        <sdk:DataGridTemplateColumn Header="Questions" CellTemplate="{StaticResource questionCellStyle}" SortMemberPath="QuestionTitle"/>
                    </sdk:DataGrid.Columns>                
                </sdk:DataGrid>
            
                <!--<uc:QuestionDetail x:Name="questionDetail" 
                                   Grid.Column="1" 
                                   DataContext="{Binding ElementName=dgQuestionList, Path=SelectedItem}"
                                   Visibility="Visible" />-->
            </Grid>
        </ScrollViewer>
    </Grid>

</navigation:Page>
